zip

infix fun <R> zip(other: Option<R>): Option<Pair<T, R>>

Returns Some containing a Pair of values of this and other if both Options are Some. Otherwise returns None.

Return

Some containing a Pair of values of this and other if both Options are Some. Otherwise returns None.

Since

1.1

Parameters

other

Other Option.

inline fun <T1, R> zip(other: Option<T1>, transform: (T, T1) -> R): Option<R>

Returns Some containing the result of applying transform to both values of this and other if both Options are Some. Otherwise returns None.

Return

Some containing the result of applying transform to both values of this and other if both Options are Some. Otherwise returns None.

Since

1.1

Parameters

other

Other Option.

transform

Function transforming values of both Some.